/*
 * @Author: sunzhijun 
 * @Date: 2019-02-19 20:36:30 
 * @Last Modified by: sunzhijun
 * @Last Modified time: 2020-04-17 13:16:44
 */
/**
 * @param {Boolean} setModalVisible 是否显示新增弹窗
 * @param {String} pkOrg 组织编码 *必传
 * @param {Boolean} agFlag 是否选择协议签订,如果为true则进入协议类型弹窗
 * @param {String} appCode 在本节点调用其他节点的appCode
 * @param {Boolean} isInterrupt 合同续签专用
 * @param {Boolean} isBreak  是否阻塞下一步操作,默认为false不阻塞
 * @param {String} tableId 模板id，需要时再传，不需要不传
 * @param {Boolean} isClearList 选择协议时是否清空列表内容
 * @param {String} isIncludeCancelDept 是否显示已撤销部门 "true"显示 "false" 默认不显示
 * @param {Object} queryConditionParams 设置自定义参数queryCondition
 * @param {String} fntype 节点类型： 'apply' 合同申请审批，不传值为默认节点
 * @function onClose   关闭弹窗回调方法
 * @function prevHandle 上一步方法 
 * @function nextHandle 下一步方法
 * @function doneHandle 完成方法
 * @function setAgreementType 设置协议类型 (refs 设置)
 */

import React, {Component} from 'react';
import {base, ajax, toast, promptBox} from 'nc-lightapp-front';
// import Tree from '../../../../hrhi/refer/hiref/PsnjobRefTreeGridRef/index';
import Tree from './treegridref';
import TreeGrid from '../../../refer/cmref/PsnJobGridRef';
import ChangePersonnel from '../ChangePersonnel';
import './index.less';

const {NCModal, NCButton, NCTable, NCRadio, NCSelect, NCStep} = base;
const {Header: NCModalHeader, Body: NCModalBody, Footer: NCModalFooter} = NCModal;
const NCOption = NCSelect.NCOption;
const {NCSteps} = NCStep;

const languageId = "sign6011";
const domainName = "hrcm";

/**
 *
 *
 * @class IncreasedListModal
 * @extends {Component}
 */
class IncreasedListModal extends Component {
    constructor(props) {
        super(props);
        props.use.editTable('psnList')
        this.state = {
            json:{},
            pk_org: props.pkOrg || '',
            popData: '',
            tableid: '',
            cacheTableId: '',
            selectSearchId: 'query',
            oid: '',
            agFlag : props.agFlag || false,
            appCode: props.appCode,
            pageCode: props.pageCode,
            queryConditionParams: props.queryConditionParams || {},
            stepNo : 0,                                                 //step页数
            isPrev : true,                                              //上一页
            isNext : false,                                             //下一页
            isDone : true,                                              //完成
            showPage: true,
            agreementType: '',                                          //默认协议类型为空
            isClearList: props.isClearList || false,                    //选择协议时是否清空列表
            fntype: props.fntype || ''                                  //节点类型： 'apply' 合同申请审批，不传值为默认节点
        }
        this.getSearchData = this.getSearchData.bind(this);
        this.nextHandleFn = this.nextHandleFn.bind(this);
        this.doneHandleFn = this.doneHandleFn.bind(this);
        this.prevHandleFn = this.prevHandleFn.bind(this);
        this.closeModal = this.closeModal.bind(this);
    }

    static defaultProps={
        isIncludeCancelDept: 'false'
    };

    componentDidMount() {
        let callback = (json, status, inlt) => {
            if (status) {
                this.lang = json
                this.setState({json, inlt},()=>{
                    this.getfetchTableData();
                    this.getLangForTree();
                })//存json和inlt到页面state中并刷新页面
            }
        }
        this.props.MultiInit.getMultiLang({ moduleId: languageId, domainName: domainName, callback });
    }

    // componentDidMount() {
    //     // this.getfetchTableData()
    // }

    componentWillReceiveProps(nextProps){
        if(!!nextProps.tableId){
            this.setState({
                tableid: nextProps.tableId
            })
        }
    }

    componentWillUnmount() {
        this.timer && clearTimeout(this.timer);
    }

    //初始化数据
    getfetchTableData(){
        let { agFlag, pk_org, appCode, pageCode, fntype } = this.state;
        if(!!fntype && fntype === 'apply'){
            ajax ({
                url: '/nccloud/hrcm/ctrtmng/CtrtMngPsnSelInitAction.do',
                data:{
                    pk_org: pk_org,
                    appCode: appCode,
                    pageCode: pageCode,
                    queryArea: 'query',
                },
                success: res => {
                    if(res.success){
                        let data = res.data.data;
                        let psnList = data.template.psnList;
                        let btnData = data.btns;
                        let stepData = data.steps;
                        let agTypsData = data.agTyps;
                        let query_add = data.query_add; //条件选人模版
                        let meta = this.props.meta.getMeta();
                        if(!!meta.query){ //此处操作是因为配置模板中有个多余的query,没什么用但一直未删除，因此前端做此处理。
                            delete meta.query;
                        }
                        query_add.items.map((v)=>{
                            if(v.attrcode == 'hi_psnjob.pk_dept' || v.attrcode == 'hi_psnjob.series'){
                                v.queryCondition = {
                                    pk_org: this.state.pk_org
                                }
                            }
                        });
                        let template = {
                            psnList : psnList,
                            btnData: btnData,
                            steps: stepData,
                            agTyps: agTypsData,
                            query_add: query_add
                        }
                        this.props.meta.addMeta(Object.assign(meta,template));
                        let mouldId = template.psnList ? 'psnList' : '';
                        // 清除原有数据
                        this.props.editTable.setTableData(mouldId, {rows: []})
                        this.setState({
                            popData: template,
                            tableid : mouldId,
                            cacheTableId: mouldId,
                            selectSearchId: 'query_add',
                            oid: query_add.oid
                        })
                    }
                }
            })
        }else{
            ajax ({
                url: '/nccloud/hrcm/common/PsnSelInitAction.do',
                data:{
                    agFlag: agFlag,
                    appCode: appCode
                },
                success: res => {
                    if(res.success){
                        let data = res.data.data;
                        let psnList = data.template.psnList;
                        let btnData = data.btns;
                        let stepData = data.steps;
                        let agTypsData = data.agTyps;
                        let query_add = data.query_add; //条件选人模版
                        let meta = this.props.meta.getMeta();
                        if(!!meta.query){ //此处操作是因为配置模板中有个多余的query,没什么用但一直未删除，因此前端做此处理。
                            delete meta.query;
                        }
                        query_add.items.map((v)=>{
                            if(v.attrcode == 'hi_psnjob.pk_dept' || v.attrcode == 'hi_psnjob.series'){
                                v.queryCondition = {
                                    pk_org: this.state.pk_org
                                }
                            }
                        });
                        let template = {
                            psnList : psnList,
                            btnData: btnData,
                            steps: stepData,
                            agTyps: agTypsData,
                            query_add: query_add
                        }
                        this.props.meta.addMeta(Object.assign(meta,template));
                        let mouldId = template.psnList ? 'psnList' : '';
                        // 清除原有数据
                        this.props.editTable.setTableData(mouldId, {rows: []})
                        this.setState({
                            popData: template,
                            tableid : mouldId,
                            cacheTableId: mouldId,
                            selectSearchId: 'query_add',
                            oid: query_add.oid
                        })
                    }
                }
            })
        }
    }

    //关闭弹窗
    closeModal() {
        let { json } = this.state;
        let promptInfo = {
            title: json['hrcm-000023'],
            con: json['hrcm-000024'],
            isShowBtn: false,
            closeFn: ()=>{
                this.props.onClose();
            }
        };
        this.promptBoxModal(promptInfo);
    }

    //确认弹窗
    promptBoxModal(args){
        let { json } = this.state;
        promptBox({
            color: 'warning',                   // 提示类别默认"success"， "success"/"info"/"warning"/"danger",非必输
            title: args.title,                  // 提示标题, 默认不同类别下分别为："已成功"/"帮助信息"/"请注意"/"出错啦",非必输/* 国际化处理： 确认删除*/
            content: args.con,                  // 提示内容,非必输/* 国际化处理： 您确定要删除所选数据么?*/
            noFooter: false,                    // 是否显示底部按钮(确定、取消),默认显示(false),非必输
            noCancelBtn: args.isShowBtn,        // 是否显示取消按钮,，默认显示(false),非必输
            beSureBtnName: json['hrcm-000006'],               // 确定按钮名称, 默认为"确定",非必输/* 国际化处理： 确定*/
            cancelBtnName: json['hrcm-000007'],               // 取消按钮名称, 默认为"取消",非必输/* 国际化处理： 取消*/
            hasCloseBtn:true,                   //显示“X”按钮，默认不显示，不显示是false，显示是true
            beSureBtnClick: args.closeFn,       // 确定按钮点击调用函数,非必输
            // cancelBtnClick: functionCancel,  // 取消按钮点击调用函数,非必输
            // closeBtnClick:functionClose,     //关闭按钮点击调用函数，非必输
            closeByClickBackDrop:false,         //点击遮罩关闭提示框，默认是true点击关闭，阻止关闭是false
        })
    }

    //上一步
    prevHandleFn(){
        let { stepNo, popData, cacheTableId } = this.state;
        let totlePage = popData.steps.length - 1;
        this.setState({
            tableid: cacheTableId
        },()=>{
            if(stepNo == 1){  //如果到第一页时
                this.pageBtnStatus(false,{isPrev: true,isNext: false,isDone: true,showPage: true,stepNo});
            }else{
                this.pageBtnStatus(false,{isPrev: false,isNext: false,isDone: true,showPage: false,stepNo});
            }
        });
    }

   //翻页按钮状态
    pageBtnStatus(isUpDown,{showPage,isPrev,isNext,isDone,stepNo,selectData}){
        let agreementType = this.state.agreementType;
        this.setState({
            showPage: showPage,
            isPrev : isPrev, //上一页
            isNext : isNext,//下一页
            isDone : isDone,//完成
            stepNo: isUpDown ? ++stepNo : --stepNo
        },()=>{
            isUpDown ? 
            this.props.nextHandle && this.props.nextHandle(selectData,agreementType) :
            this.props.prevHandle && this.props.prevHandle()
        });
    }

    //下一步设置数据
    nextHandleFn(){
        let selectData = this.props.editTable.getCheckedRows(this.state.tableid);
        let { popData, stepNo, json, agreementType } = this.state;
        let totlePage = popData.steps.length - 1;
        if(selectData.length){
            if(this.props.isInterrupt && selectData.length >= 2){ //合同续签专用
                this.props.selectExtendStyle && this.props.selectExtendStyle();
            }else if(this.props.isBreak){ //判断下一步是否继续执行
                return false;
            }else{
                if(totlePage > 1){  //判断页面层级数
                    if(stepNo < totlePage -1){ 
                        this.pageBtnStatus(true,{isPrev: false,isNext: false,isDone: true,showPage: false,stepNo,selectData});
                    }else if(stepNo == totlePage -1){
                        this.pageBtnStatus(true,{isPrev: false,isNext: true,isDone: false,showPage: false,stepNo,selectData});
                    }
                }else{
                    this.pageBtnStatus(true,{isPrev: false,isNext: true,isDone: false,showPage: false,stepNo,selectData});
                }
            }
        }else{
            let promptInfo = {
                title: '',
                con: json['hrcm-000025'],
                isShowBtn: true
            };
            this.promptBoxModal(promptInfo);
        }
    }

    //完成
    doneHandleFn(){
            let {agFlag, isDone, agreementType} = this.state;
            this.setState({
                isDone: true
            },()=>{
                this.props.doneHandle && this.props.doneHandle(agFlag,agreementType);
                this.timer = setTimeout(() => {
                    this.setState({
                        isDone: false
                    })
                }, 1000)
            })
    }

    //选择协议类型
    handleSelectAgreementType(v){
        let { tableid, isClearList } = this.state;
        this.setState({
            agreementType: v
        },()=>{
            this.props.update && this.props.update({agreementTypeFromAddNew: v})
            isClearList ? this.props.editTable.setTableData(this.state.tableid, {rows: []}) : null
        })
    }

    //协议类型
    agreementType(agTyps){
        let { agreementType } = this.state;
        let defaultAgreementType = !!agreementType ? agreementType : agTyps[0].code;
        if( !agreementType ){
            this.setState({
                agreementType : defaultAgreementType
            });
        }
        return(
            <div style={{float: "left"}}>
                <span style={{float: "left",display: "inlineBlock",lineHeight: "30px",marginRight:"10px"}}>{this.state.json['hrcm-000026']}</span>
                <div style={{float: "left"}}>
                    <NCSelect
                        defaultValue={defaultAgreementType}
                        style={{width: 150, marginRight: 6 }}
                        onSelect={this.handleSelectAgreementType.bind(this)}
                    >
                        {
                           !!agTyps.length &&  agTyps.map((v,i)=>{
                                return (
                                    <NCOption value={v.code}>{v.name}</NCOption>
                                )
                            })
                        }
                    </NCSelect>
                </div>
            </div>
        )
    }
    
    // //变动人员
    // changePersonnel(){
    //     return (
    //         <NCButton size="sm" onClick={ this.handleClick }>变动人员</NCButton>
    //     )
    // }

    //显示进度条
    showSteps(obj){
        let steps = obj.steps || [];
        let stepNo = this.state.stepNo;
        return (
            <div className="step-header" style={{marginBottom: "10px"}}>
                <NCSteps 
                    current={stepNo}
                    finishStatus="success"
                >
                    {
                        steps.map((v,i)=>{
                            return (
                                <NCStep title={v} />
                            )
                        })
                    }
                </NCSteps>
            </div>
        )
    }

    //设置协议类型
    setAgreementType(type){
        this.setState({
            agreementType: type
        })
    }
    // 获取参照组织树多语
    getLangForTree = () => {
        const { json } = this.state
        let callback = (_json, _status, _inlt) => {
            if (_status) {
                let lang = Object.assign({},json,_json)
                this.setState({ json:lang })
            }
        }
        this.props.MultiInit.getMultiLang({ moduleId: 'refer6011', domainName: 'hrcm', callback });
    }
    configInTree = () => {
        let { json } = this.state;
        return {
            refType: 'gridTree',
            refName: json['cm6011-000002'],
            placeholder: json['cm6011-000002'],
            refCode: 'hrhi.refer.PsnjobRefTreeGridRef',
            queryTreeUrl: '/nccloud/hrhi/ref/BusiOrgTreeRef.do',
            queryGridUrl: '/nccloud/hrhi/ref/PsnJobBusiGridRef.do',
            rootNode: { refname: json['cm6011-0000013'], refpk: 'root', isleaf: false },/* 国际化处理： 组织部门*/
            columnConfig:
                [{
                    name: [
                        json['cm6011-000008'],
                        json['cm6011-000004'],
                        json['cm6011-000009'],
                        json['cm6011-0000010'],
                        json['cm6011-0000011'],
                        json['cm6011-0000012'],
                        json['cm6011-000005']
                    ],
                    code: [
                        'bd_psndoc.code',   //员工编码
                        'refname',          //姓名
                        'clerkcode',        //员工号
                        'org_orgs.name',    //组织
                        'org_dept.name',    //部门
                        'om_post.postname', //岗位
                        'ismainjob'         //主职
                    ]
                }],/* 国际化处理： 编码,名称*/
            isMultiSelectedEnabled: false,
        };
    }
    //显示选人
    showSelectPersonnel(obj){
        let btns = obj.btnData || [];
        let agTyps = obj.agTyps || [];
        let { agFlag, queryConditionParams, json } = this.state;
        const conf = this.configInTree();
        return(
            <div style={{overflow: "hidden",padding: "10px 0"}}>
                {/*协议类型 */}
                {!!agTyps.length ? this.agreementType(agTyps) : ''} 
                <div style={{float: "right",display: 'flex'}}>
                    {
                        !!btns.length && btns.map((v, i) => {
                            if(v.visibleFlag && v.btnType == 1){
                                let button = <NCButton size="sm" style={{"white-space": "nowrap"}}>{v.btnName}</NCButton>;
                                if(agFlag){
                                    return(
                                        <TreeGrid
                                            clickContainer={button}
                                            isMultiSelectedEnabled={true}
                                            queryCondition={() => {
                                                return {
                                                    "appCode": this.state.appCode ,
                                                    "pk_org": this.state.pk_org,
                                                    "agreementType" : this.state.agreementType,
                                                    "busiregionEnum": "psnpact",
                                                    "GridRefActionExt": 'nccloud.web.hrcm.make.sqlbuilder.PsnSelSqlBuilder'
                                                };
                                            }}
                                            onChange={(value) => {
                                                this.setState({
                                                    type: v.btnType
                                                },() => {
                                                    this.referSearch(value);
                                                });
                                            }}
                                        />
                                    )
                                }else{
                                    return(
                                        <Tree
                                            {...conf}
                                            MultiInit={this.props.MultiInit}
                                            clickContainer={button}
                                            isMultiSelectedEnabled={true}
                                            isCacheable={false}
                                            queryCondition={() => {
                                                return Object.assign({
                                                    "appCode": this.state.appCode,
                                                    "pk_org": this.state.pk_org,
                                                    "busiregionEnum": "psnpact",
                                                    "GridRefActionExt": 'nccloud.web.hrcm.make.sqlbuilder.PsnSelSqlBuilder'
                                                }, queryConditionParams);
                                            }}
                                            onChange={(value) => {
                                                this.setState({
                                                    type: v.btnType
                                                },() => {
                                                    this.referSearch(value);
                                                });
                                            }}
                                        />
                                    )
                                }
                            }else if(v.visibleFlag){
                                return(
                                    <div style={{width: "100%"}}>
                                        <NCButton size="sm" onClick={ ()=> this.referSelectFn(v.btnType) }>{v.btnName}</NCButton>
                                    </div>
                                )
                            }
                        })
                    }
                    
                </div>
            </div>
        )
    }

    //参照选人
    referSelectFn(btnType) {
        // this.props.referSelect && this.props.referSelect(btnType); 
        if(btnType == 0){
            this.setState({
                isVisible: true
            })
        }else if(btnType == 2){ //条件选人
            this.openSearch()
        }
        this.setState({
            type: btnType
        })
    }

    //打开条件选人查询面板
    openSearch(){
        let { pk_org, selectSearchId } = this.state;
        let { isIncludeCancelDept } = this.props;
        this.props.search.openAdvSearch(selectSearchId, true, ()=>{
            let meta = this.props.meta.getMeta();
            let items = meta[selectSearchId].items;
            items.length > 0 && items.map((item,index)=>{
                if( item.attrcode === 'hi_psnjob.clerkcode' ){
                    item.queryCondition = {
                        pk_org: pk_org,
                        busiregionEnum: "psnpact"
                    }
                }else if (item.attrcode === 'pk_psndoc'){
                    item.queryCondition = {
                        pk_org: pk_org,
                        isFilterByPkOrg: "true",
                        isIncludeCancelDept: isIncludeCancelDept,
                        GridRefActionExt: "nccloud.web.hrcm.pub.sqlbuilder.PsndocQryRefSqlBuilder"
                    }
                }
            })
            this.props.meta.setMeta(meta);
        });
    }

    //条件查询
    getSearch(){
        // let conditions = this.props.search.getAllSearchData(this.state.selectSearchId).conditions || [];
        let getConditions = this.props.search.getQueryInfo(this.state.selectSearchId,true);
        let conditions = getConditions && getConditions.querycondition;
        this.getSearchData(conditions);
    }

    //参照选人
    referSearch(val) {
        let arr = [];
        val && val.map((v,i)=>{
            arr.push(v.refpk);
        })
        this.getSearchData(arr);
    }

    //选人条件筛选获取数据
    getSearchData(conditions={}, jobpks=[], id, isSure){
        let pk_psnjobArr = [];
        let { agFlag, appCode, type, pk_org, oid, agreementType, tableid, json, fntype} = this.state;
        let tempId = !!tableid ? tableid : id;
        let conditionsObj,conditionsArr, ajaxUrl, paramObj;
        // let queryCondition = {
        //     conditions: conditions
        // }
        // if(agFlag){
            pk_psnjobArr = jobpks;
        // }else{
            let oldList = this.props.editTable.getAllRows(tempId) || [];
            if(oldList.length){
                oldList.forEach((v,i)=>{
                    pk_psnjobArr.push(v.values.pk_psnjob.value);
                });
            }
        // }
        if(Array.isArray(conditions)){
            conditionsArr = conditions;
        }else{
            conditionsObj = conditions;
        }
        if(fntype === 'apply'){
            ajaxUrl = '/nccloud/hrcm/ctrtmng/CtrtMngQueryPsnAction.do';
            paramObj={
                oldList: pk_psnjobArr,
                appCode: appCode ,
                btnType: type || 1,
                querycondition: conditionsObj,
                refList: conditionsArr,
                pk_org: pk_org,
                isSure: isSure,
                oid: oid,
                querytype:'tree'
            }
        }else{
            ajaxUrl = '/nccloud/hrcm/common/QueryPsnAction.do';
            paramObj={
                agreementType: agreementType,
                oldList: pk_psnjobArr,
                appCode: appCode ,
                btnType: type || 1,
                querycondition: conditionsObj,
                refList: conditionsArr,
                querytype:'tree',
                pk_org: pk_org,
                oid: oid,
                isSure: isSure
            }
        }
        ajax ({
            url: ajaxUrl,
            data: paramObj,
            success: res => {
                if(res.success){
                    let status = res.data.status;
                    if(status == '200'){
                        this.cancelChangeModal();
                        let rows = res.data.psnList && res.data.psnList.psnList.rows || [];
                        this.props.editTable.setTableData(tempId, {rows: rows});
                        this.setState({
                            rows : rows
                        },()=>{
                            try{
                                !!rows.length && this.props.editTable.selectAllRows(tempId,true); //设置全选
                            }catch(err){
                                console.log(err)
                            }
                        });
                    }else if(status == '301'){
                        let promptInfo = {
                            title: json['hrcm-000041'],
                            con: res.data.msg,
                            closeFn: ()=>{
                                this.getSearchData(conditions,jobpks,id,true)
                            }
                        };
                        this.promptBoxModal(promptInfo);
                    }else if(status == '300'){
                        toast({color: 'warning', content: res.data.msg});
                    }
                }else{
                    toast({color: 'warning', content: res.data.msg});
                    // this.openSearch();
                }
            }
        })
    }

    //关闭变动人员和离职人员弹窗
    cancelChangeModal(){
        this.setState({
            isVisible: false
        })
    }

    sureSelectData(){
        
    }
    onSelectedAll(props, moduleId, status) {
        props.editTable.selectAllRows(moduleId, status)
        this.setState({tst: ''})
    }
    render() {
        const {editTable, setModalVisible, search, form, agFlag, fntype} = this.props;
        let {createEditTable} = editTable;
        let {NCCreateSearch} = search;
        let {createForm} = form;
        let {popData, tableid, selectSearchId, showPage, rows, stepNo, isPrev, isNext, isDone, isVisible, json, agreementType} = this.state;
        // if(showPage && rows && rows.length && tableid){
        //     this.props.editTable.setTableData(tableid, {rows: rows});
        //     this.props.editTable.selectAllRows(tableid,true); //设置全选
        // }
        return (
            <NCModal
                show={setModalVisible}
                onHide={ this.closeModal }
                backdrop={'static'}
                size="lg"
                dialogClassName="nc-modal-height"
            >
                <NCModalHeader closeButton={true}>
                    {json['hrcm-000027']}
                </NCModalHeader>
                <NCModalBody>
                    <div className="fristpage">
                        {this.showSteps(popData)}
                        <div className='nc-singleTable-table-area' style={{display: showPage ? '' : 'none'}}>
                            {this.showSelectPersonnel(popData)}
                            {
                                tableid && createEditTable(tableid,{
                                    cancelCustomRightMenu: true,
                                    showIndex: true,        //显示序列号
                                    showCheck: true,        //显示复选框
                                    height: 340,
                                    onSelectedAll: this.onSelectedAll.bind(this),
                                })
                            }
                        </div>
                        
                        <div style={{display: 'none'}}>
                            {
                                NCCreateSearch(selectSearchId, {
                                    clickSearchBtn: this.getSearch.bind(this),
                                    onlyShowAdvArea: false,
                                    showAdvSearchPlanBtn: true,
                                    onlyShowSuperBtn: true
                                })
                            }
                        </div>
                    </div>
                    <div className='nc-singleTable-table-area card-area' style={{display: showPage ? 'none' : ''}}>
                        {this.props.children}
                    </div>
                    {
                        isVisible ? 
                            <ChangePersonnel
                                {...this.props}
                                json = {json}
                                isVisible={isVisible}
                                agreementType={agreementType}
                                cancelChangeModal={this.cancelChangeModal.bind(this)}
                                sureSelectData={this.sureSelectData.bind(this)}
                                getSearchData={this.getSearchData.bind(this)}
                            >
                            </ChangePersonnel> : ''
                    }
                    
                </NCModalBody>
                <NCModalFooter>
                    <NCButton disabled={isPrev} onMouseDown={ this.prevHandleFn }>
                        {json['hrcm-000028']}
                        {/* 上一步 */}
                    </NCButton>
                    <NCButton disabled={isNext} onClick={ this.nextHandleFn }>
                        {json['hrcm-000029']}
                        {/* 下一步 */}
                    </NCButton>
                    <NCButton disabled={isDone} onMouseDown={ this.doneHandleFn }>
                        {/* 完成 */}
                        {fntype === 'apply' ? json['hrcm-000008'] : json['hrcm-000030']}
                    </NCButton>
                    <NCButton onMouseDown={ this.closeModal }>
                        {json['hrcm-000007']}
                        {/* 取消 */}
                    </NCButton>
                </NCModalFooter>
            </NCModal>
        );
    }
}

export default IncreasedListModal;
